From: kaf24@freefall.cl.cam.ac.uk Date: Mon, 27 Sep 2004 13:12:49 +0000 (+0000) Subject: bitkeeper revision 1.1159.1.188 (415811d1m0nK1omm86T97uO0zh9rqw) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17400^2~563 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=72e6137779b95c33de08253a60de275f6c5da2fb;p=xen.git bitkeeper revision 1.1159.1.188 (415811d1m0nK1omm86T97uO0zh9rqw) Increase rx headroom. --- diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c index fb1abec185..5ecb24f435 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c @@ -32,14 +32,10 @@ #define DEBUG 0 #if DEBUG - #define DPRINTK(fmt, args...) \ printk(KERN_INFO "[XEN] %s" fmt, __FUNCTION__, ##args) - #else - #define DPRINTK(fmt, args...) ((void)0) - #endif #define IPRINTK(fmt, args...) \ @@ -51,8 +47,6 @@ #define EPRINTK(fmt, args...) \ printk(KERN_ERROR "[XEN]" fmt, ##args) - - #ifndef __GFP_NOWARN #define __GFP_NOWARN 0 #endif @@ -66,7 +60,7 @@ } while ( 0 ) /* Allow headroom on each rx pkt for Ethernet header, alignment padding, ... */ -#define RX_HEADROOM 100 +#define RX_HEADROOM 200 /* * If the backend driver is pipelining transmit requests then we can be very @@ -757,9 +751,10 @@ static void network_connect(struct net_device *dev, spin_unlock_irq(&np->tx_lock); } -static void vif_show(struct net_private *np){ +static void vif_show(struct net_private *np) +{ #if DEBUG - if(np){ + if (np) { IPRINTK(" \n", np->handle, be_state_name[np->backend_state], @@ -774,9 +769,9 @@ static void vif_show(struct net_private *np){ #endif } -/* Send a connect message to xend to tell it to bring up the interface. - */ -static void send_interface_connect(struct net_private *np){ +/* Send a connect message to xend to tell it to bring up the interface. */ +static void send_interface_connect(struct net_private *np) +{ ctrl_msg_t cmsg = { .type = CMSG_NETIF_FE, .subtype = CMSG_NETIF_FE_INTERFACE_CONNECT, @@ -1034,8 +1029,8 @@ static void netif_interface_status(netif_fe_interface_status_t *status) switch (status->status) { case NETIF_INTERFACE_STATUS_CLOSED: - switch(np->backend_state){ - + switch ( np->backend_state ) + { case BEST_CLOSED: case BEST_DISCONNECTED: case BEST_CONNECTED: @@ -1045,12 +1040,11 @@ static void netif_interface_status(netif_fe_interface_status_t *status) break; case NETIF_INTERFACE_STATUS_DISCONNECTED: - switch(np->backend_state){ - + switch ( np->backend_state ) + { case BEST_CLOSED: vif_disconnect(np); break; - case BEST_DISCONNECTED: case BEST_CONNECTED: vif_reset(np); @@ -1059,29 +1053,24 @@ static void netif_interface_status(netif_fe_interface_status_t *status) break; case NETIF_INTERFACE_STATUS_CONNECTED: - switch(np->backend_state){ - + switch ( np->backend_state ) + { case BEST_CLOSED: unexpected(np, status); vif_disconnect(np); vif_connect(np, status); break; - case BEST_DISCONNECTED: vif_connect(np, status); break; - - case BEST_CONNECTED: - //todo Do what? - unexpected(np, status); - break; } break; case NETIF_INTERFACE_STATUS_CHANGED: - /* The domain controller is notifying us that a device has been - * added or removed. - */ + /* + * The domain controller is notifying us that a device has been + * added or removed. + */ break; default: